package com.zsy.controller;

import com.zsy.entity.TalentRecruitment;
import com.zsy.entity.UserResumeCenter;
import com.zsy.service.impl.ShareServiceImpl;
import com.zsy.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
//组件化
public class ShareController {
    //把Service接口注入进来
    @Autowired
    private ShareServiceImpl ssi;
    //页面渲染
    @GetMapping("/selectsome")
    public Result Selectfirst(){
        return ssi.Selectsome();
    }
    //渲染人才招聘接口 。
    @GetMapping("/SelectTalent")
    public Result Select(){
        return ssi.Rendering();
    }
    //新增简历注解
    @PostMapping("/AddTalent")
    public Result Add(TalentRecruitment t){
        return ssi.AddResume(t);
    }
    //修改信息
    @PostMapping("/UpdataTalent")
    public Result Updata(TalentRecruitment t){
        return ssi.UpdataResume(t);
    }
    //删除信息
    @PostMapping("/DeleteTalent")
    public Result Delete(Integer[] talentId,String deleterPeople){
        return ssi.DeleteResume(talentId,deleterPeople);
    }


    //新增简历
    @PostMapping("/AddResume")
    public Result Add(UserResumeCenter UR){
        return ssi.AddResume(UR);
    }
    //人事面试
    @PostMapping("/Updatepersonnel")
    public Result Update(Integer id,String personnelName){
        return ssi.Updatepersonnel(id,personnelName);
    }
    //技术面试
    @PostMapping("/Updatetechnical")
    public Result Updatetechnical(Integer id,String technicalname){
        return ssi.Updatetechnical(id, technicalname);
    }
    //面试通过情况
    @PostMapping("/interviewstatus")
    public Result interview(Integer id,String admissionName,Integer admission){
        return ssi.interview(id, admissionName, admission);
    }
    //查看简历全部
        @GetMapping("/SelectURC")
    public Result SelectURC(){
        return ssi.seleURS();
        }
        //首页查看简历
        @GetMapping("/SelsomeURC")
        public Result SelectsomeURC(){
            return ssi.selesomeURS();
        }

}
